

tan2 %>%
  group_by(female) %>%
  summarise(accusation_not_true = mean(b_s9q1_mob_trustaccusers ==2, na.rm =T),
            affraid_accusation = mean(b_s9q2_mob_falseaccuse %in% c(1,2), na.rm = T),
            beat_thief = mean(beat_thief, na.rm = T))


all_tan <- rbind(tan2 %>% select(c("accusation_not_true","afraid_accusation", "female", 
                                   "woman","community")), 
                 tan3 %>% select(c("accusation_not_true","afraid_accusation", "female", 
                                   "woman","community"))
                 )


table_data <- 
  prepare_multiple_tables_data_no_prime(
    outcome_texts = c("Some people suspected of crimes are not necessarily criminals.", 
                    "It is somewhat or very likely [I/an innocent person] could be falsely accused."),
    outcome_vars = c("accusation_not_true","afraid_accusation"),
    data_list = list(
      as.data.frame(all_tan), 
      as.data.frame(all_tan)
    )
  )



sink("04_manuscript/tables/tanzania_table.tex")
build_table_no_prime(table_data = table_data)
sink()

lm(afraid_accusation ~ woman + community, all_tan) %>% summary
lm(accusation_not_true ~ woman + community, all_tan) %>% summary

